{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">信息管理</li>
            <!-- <li class=""><a href="{:url('admin/RechargeRecord/add')}">添加信息</a></li> -->
        </ul>
        <div class="layui-tab-content">

            <form class="layui-form layui-form-pane" action="{:url('admin/RechargeRecord/index')}" method="get">
                <div class="layui-inline" style="margin-bottom: 5px;">
                    <label class="layui-form-label" style="min-width:50px;">订单编号</label>
                    <div class="layui-input-inline">
                        <input type="text" name="coding" value="{$coding}" placeholder="请输入关键词" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="margin-bottom: 5px;">
                    <label class="layui-form-label" style="min-width:50px;">用户名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="user_name" value="{$user_name}" placeholder="请输入用户名称" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="margin-bottom: 5px;">
                    <label class="layui-form-label" style="min-width:50px;">导航栏名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="nav_name" value="{$nav_name}" placeholder="请输入导航栏名称" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="margin-bottom: 5px;">
                    <label class="layui-form-label" style="min-width:50px;">办理</label>
                    <div class="layui-input-inline">
                        <select name="status" lay-verify="">
                          <option value="2" {if $status == 2}selected="selected"{/if}>全部</option>
                          <option value="1" {if $status == 1}selected="selected"{/if}>已办理</option>
                          <option value="0" {if $status == 0}selected="selected"{/if}>未办理</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline"  style="margin-bottom: 5px;">
                    <button class="layui-btn">搜索</button>
                </div>
            </form>
            <hr>

            <form action="" method="post" class="ajax-form">
                <button type="button" class="layui-btn layui-btn-small ajax-action" data-action="{:url('admin/RechargeRecord/toggle',['type'=>'audit'])}">办理</button>
                <button type="button" class="layui-btn layui-btn-warm layui-btn-small ajax-action" data-action="{:url('admin/RechargeRecord/toggle',['type'=>'cancel_audit'])}">取消办理</button>
                <button type="button" class="layui-btn layui-btn-danger layui-btn-small ajax-action" data-action="{:url('admin/RechargeRecord/delete')}">删除</button>
                <div class="layui-tab-item layui-show">
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th style="width: 15px;"><input type="checkbox" class="check-all"></th>
                            <th style="width: 30px;">ID</th>
                            <th>订单编号</th>
                            <th>用户名称</th>
                            <th>导航栏名称</th>
                            <th>预留名称</th>
                            <th>预留电话</th>
                            <th>办理</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name="rechargerecord_list" item="vo"}
                        <tr>
                            <td><input type="checkbox" name="ids[]" value="{$vo.id}"></td>
                            <td>{$vo.id}</td>
                            <td>{$vo.coding}</td>
                            <td>{$vo.user_name}</td>
                            <td>{$vo.nav_name}</td>
                            <td>{$vo.name}</td>
                            <td>{$vo.phone}</td>
                            <td>
                            {if $vo.status==1}
                                    <i style="font-style: normal;color:#4caf50;">已办理</i>
                                {else /}
                                    <button type="button" class="layui-btn layui-btn-small ajax-action layui-btn-mini" data-action="{:url('admin/RechargeRecord/toggle',['type'=>'audit','id'=>$vo['id']])}">办理</button>
                                {/if}
                            </td>
                            <td>
                                <a href="{:url('admin/RechargeRecord/reading',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-mini">查看</a>
                                <a href="{:url('admin/RechargeRecord/delete',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-delete">删除</a>
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                    <!--分页-->
                    {$rechargerecord_list->render()}
                </div>
            </form>
        </div>
    </div>
</div>
{/block}